package com.gs.weather.entity;

import org.apache.ibatis.type.Alias;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Legolas
 * Date: 2017/9/21 0021
 */
/*
* mysql中用DATE_FORMAT()函数对字符串进行处理
* */
@Alias("DisasterProcess")
public class DisasterProcess {
    private Long id;
    private String xsAreaName;
    private String startTime;
    private String endTime;
    private Integer diePeople;
    private Integer hurtPeople;
    private Integer affectPeople;
    private Integer collapseBuilding;
    private Integer damageBuilding;
    private Integer damageFarm;
    private Integer moneyLoss;
    private Integer damageRoad;
    private Integer affectArea;
    private String description;
    private String lossDescription;
    private List<DisasterInfo> disasterInfos;//包含多个灾害信息

    public DisasterProcess() {
    }

    public DisasterProcess(String xsAreaName, String startTime, String endTime, Integer diePeople, Integer hurtPeople, Integer affectPeople, Integer collapseBuilding, Integer damageBuilding, Integer damageFarm, Integer moneyLoss, Integer damageRoad, Integer affectArea, String description, String lossDescription) {
        this.xsAreaName = xsAreaName;
        this.startTime = startTime;
        this.endTime = endTime;
        this.diePeople = diePeople;
        this.hurtPeople = hurtPeople;
        this.affectPeople = affectPeople;
        this.collapseBuilding = collapseBuilding;
        this.damageBuilding = damageBuilding;
        this.damageFarm = damageFarm;
        this.moneyLoss = moneyLoss;
        this.damageRoad = damageRoad;
        this.affectArea = affectArea;
        this.description = description;
        this.lossDescription = lossDescription;
    }

    public DisasterProcess(Long id, String xsAreaName, String startTime, String endTime, Integer diePeople, Integer hurtPeople, Integer affectPeople, Integer collapseBuilding, Integer damageBuilding, Integer damageFarm, Integer moneyLoss, Integer damageRoad, Integer affectArea, String description, String lossDescription) {
        this.id = id;
        this.xsAreaName = xsAreaName;
        this.startTime = startTime;
        this.endTime = endTime;
        this.diePeople = diePeople;
        this.hurtPeople = hurtPeople;
        this.affectPeople = affectPeople;
        this.collapseBuilding = collapseBuilding;
        this.damageBuilding = damageBuilding;
        this.damageFarm = damageFarm;
        this.moneyLoss = moneyLoss;
        this.damageRoad = damageRoad;
        this.affectArea = affectArea;
        this.description = description;
        this.lossDescription = lossDescription;
    }

    public List<DisasterInfo> getDisasterInfos() {
        return disasterInfos;
    }

    public void setDisasterInfos(List<DisasterInfo> disasterInfos) {
        this.disasterInfos = disasterInfos;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getXsAreaName() {
        return xsAreaName;
    }

    public void setXsAreaName(String xsAreaName) {
        this.xsAreaName = xsAreaName;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public Integer getDiePeople() {
        return diePeople;
    }

    public void setDiePeople(Integer diePeople) {
        this.diePeople = diePeople;
    }

    public Integer getHurtPeople() {
        return hurtPeople;
    }

    public void setHurtPeople(Integer hurtPeople) {
        this.hurtPeople = hurtPeople;
    }

    public Integer getAffectPeople() {
        return affectPeople;
    }

    public void setAffectPeople(Integer affectPeople) {
        this.affectPeople = affectPeople;
    }

    public Integer getCollapseBuilding() {
        return collapseBuilding;
    }

    public void setCollapseBuilding(Integer collapseBuilding) {
        this.collapseBuilding = collapseBuilding;
    }

    public Integer getDamageBuilding() {
        return damageBuilding;
    }

    public void setDamageBuilding(Integer damageBuilding) {
        this.damageBuilding = damageBuilding;
    }

    public Integer getDamageFarm() {
        return damageFarm;
    }

    public void setDamageFarm(Integer damageFarm) {
        this.damageFarm = damageFarm;
    }

    public Integer getMoneyLoss() {
        return moneyLoss;
    }

    public void setMoneyLoss(Integer moneyLoss) {
        this.moneyLoss = moneyLoss;
    }

    public Integer getDamageRoad() {
        return damageRoad;
    }

    public void setDamageRoad(Integer damageRoad) {
        this.damageRoad = damageRoad;
    }

    public Integer getAffectArea() {
        return affectArea;
    }

    public void setAffectArea(Integer affectArea) {
        this.affectArea = affectArea;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getLossDescription() {
        return lossDescription;
    }

    public void setLossDescription(String lossDescription) {
        this.lossDescription = lossDescription;
    }

    @Override
    public String toString() {
        return "DisasterProcess{" +
                "id=" + id +
                ", xsAreaName='" + xsAreaName + '\'' +
                ", startTime='" + startTime + '\'' +
                ", endTime='" + endTime + '\'' +
                ", diePeople=" + diePeople +
                ", hurtPeople=" + hurtPeople +
                ", affectPeople=" + affectPeople +
                ", collapseBuilding=" + collapseBuilding +
                ", damageBuilding=" + damageBuilding +
                ", damageFarm=" + damageFarm +
                ", moneyLoss=" + moneyLoss +
                ", damageRoad=" + damageRoad +
                ", affectArea=" + affectArea +
                ", description='" + description + '\'' +
                ", lossDescription='" + lossDescription + '\'' +
                ", disasterInfos=" + disasterInfos +
                '}';
    }
}
